import request from '@/utils/request'

// 查询业绩规则配置列表
export function listCreditRule(query) {
  return request({
    url: '/xs/creditRule/list',
    method: 'get',
    params: query
  })
}

// 查询业绩规则配置详细
export function getCreditRule(id) {
  return request({
    url: '/xs/creditRule/' + id,
    method: 'get'
  })
}

// 新增业绩规则配置
export function addCreditRule(data) {
  return request({
    url: '/xs/creditRule',
    method: 'post',
    data: data
  })
}

// 修改业绩规则配置
export function updateCreditRule(data) {
  return request({
    url: '/xs/creditRule',
    method: 'put',
    data: data
  })
}

// 删除业绩规则配置
export function delCreditRule(id) {
  return request({
    url: '/xs/creditRule/' + id,
    method: 'delete'
  })
}
